package com.nb82.util;

import java.util.ArrayList;
import java.util.List;

import com.nb82.entity.BaseActivity;

import android.app.Activity;
import android.os.Process;

public class AcUtil {
	private static List<Activity> list = new ArrayList<Activity>();
	private static BaseActivity ac ;
	public static void add(Activity ac){
		list.add(ac);
	}
	public static void remove(Activity ac){
		list.remove(ac);
	}
	public static void finish(){
		for(Activity ac :list){
			ac.finish();
		}
		Process.killProcess(Process.myPid());
	}
	public static BaseActivity getAc() {
		return ac;
	}
	public static void setAc(BaseActivity ac) {
		AcUtil.ac = ac;
	}
	
}
